home *** CD-ROM | disk | FTP | other *** search
- _global.GWListItemClass = function(o)
- {
- super.init();
- this.init();
- };
- GWListItemClass.prototype = new GWLabelClass();
- Object.registerClass("GWListItemClass",GWListItemClass);
- GWListItemClass.prototype.init = function()
- {
- this.basecolor_on = this.basecolor_on != undefined ? this.basecolor_on : 664682;
- this.basecolor_off = this.basecolor_off != undefined ? this.basecolor_off : 16777215;
- this.basecolor_over = this.basecolor_over != undefined ? this.basecolor_over : 16777215;
- this.fontcolor_on = this.fontcolor_on != undefined ? this.fontcolor_on : 16777215;
- this.fontcolor_off = this.fontcolor_off != undefined ? this.fontcolor_off : 0;
- this.fontcolor_over = this.fontcolor_over != undefined ? this.fontcolor_over : 0;
- this.width = Math.round(this.width || this._width);
- this.height = Math.round(this.height || this._height);
- this._xscale = this._yscale = 100;
- this.drawBox("base_mc",2,0,0,1,1,this.basecolor_off,100);
- this.base_mc._alpha = this.alpha != undefined ? this.alpha : 100;
- this.setSize(this.width,this.height);
- this.setLabel(this.label);
- this.setIcon(this.icon);
- this.pady = 0;
- this.useHandCursor = false;
- };
- GWListItemClass.prototype.setData = function(d)
- {
- this.data = d;
- };
- GWListItemClass.prototype.getData = function()
- {
- return this.data;
- };
- GWListItemClass.prototype.setIcon = function(i)
- {
- if(i.length)
- {
- this.attachMovie(i,"icon_mc",3,{_x:4});
- if(this.icon_mc._height > this.height)
- {
- this.sizeMe(this.icon_mc._width * (this.height / this.icon_mc._height),this.height,this.icon_mc);
- }
- this.setLabelPlacement("right");
- }
- };
- GWListItemClass.prototype.setSize = function(w, h)
- {
- if(!this.label_mc)
- {
- this.createEmptyMovieClip("label_mc",500);
- this.drawBox("mask_mc",501,0,0,this.width - this.padx,this.height - this.pady,0,0);
- }
- this.width = this.base_mc._width = w;
- this.height = this.base_mc._height = h;
- this.mask_mc._width = w - this.padx * 3;
- this.mask_mc._height = h - this.pady * 2;
- if(this.labelAlign == "center")
- {
- this.label_mc._x = Math.round((this.width - this.label_mc._width) / 2);
- }
- };
- GWListItemClass.prototype.setBaseColor = function(c)
- {
- var _loc2_ = new Color(this.base_mc);
- _loc2_.setRGB(c);
- };
-